Initial Setup
In order to use the IQNOX widgets in a mashup you will need to set the TemplateStore property on the mashup itself. In the Explorer tab, select the mashup and search for the TemplateStore property. If you don't already have a TemplateStore you can easily create a new one by creating a new Thing and using the IQNOX_Widget_Template_Store_TT Thing Template or you can duplicate an existing TemplateStore.
All IQNOX widget styles are stored in templates. All these templates are stored in a TemplateStore Thing. You can have multiple TemplateStore Things for a single application, and you can switch between them at runtime by binding the TemplateStore property on the mashup/master. This means that you can change all the application styles based on user preferences or actions. For example, creating a Light and Dark mode for your app.
Content Security Policy (CSP) settings
In recent versions of ThingWorx, PTC introduced the capability to enable and customize Content Security Policy rules. These are important for securing the application environment and managing what resources can be loaded. See the official ThingWorx documentation.
In order for the IQNOX Widgets to work properly, the following additions are required. Please see the official ThingWorx documentation for how to add these settings to your ThingWorx instance.
Directive | Value | Additional notes about this setting |
---|---|---|
img-src | blob: | blob: is required for uploading images with the File Uploader widget. |
img-src | https://tile.openstreetmap.org | The tile provider for the Map Widget. If using custom tile providers, these must be whitelisted here. |
worker-src | blob: | For the IQNOX charts to function properly, as well as for the CSS editor |